documentation for orbits function