added a polling function as well as modified updatePlayer