re-ordered functions to match order in signatures

okay...now I'm really ready to submit