adapt old entity code to the project
Merge branch 'master' into Rudy