corrects calculation of orbits