added function for box and player
added function for box and player