rewrote most part of the orbitalsgenerator appendix