Got a couple of functions in the wrong order