player class tested and working finally