basically this: https://stackoverflow.com/questions/53848410/typescript-function-overloading-with-enum but implemented in lua. 