updated Entity cpp file