clean up the method to get entity properties