added the animatedEntity class and varius methods to make it works