added functions to Entity