changed entity interface to class