working on entity manager (engine currently broken)