moved speed variable from player to entity class