prefecting entity.js