added player support
refactoring