function prototypes on top, added additional turn profiles, function names changed