moved entity functions