player functionality added
REFACTOOOOOOOR!