overhauled the orbit calculating code;