The gravitational behaviour of a dense compact object is studied in isotropic coordinates. We obtain new classes of static, spherically symmetric classes of solutions to the Einstein-Maxwell field equations by assuming an anisotropic pressures and a barotropic equation of state which is polytropic. Four new classes of exact solutions are found with different polytropic indices. We can regain masses of several observed astronomical objects. A physical analysis indicates that the models are well behaved.