cleaned entity code