refactored player managment stuff into a new class