implemented threading in player