added new functions to handle players and bullets