replaced entity __init__ with OnInit