add move function to entity