refactored players controller