use consistent order of function definitions