simplified player functions by moving them out of namespace Player