modified entity code