started to modify input code for entity use.