added basic functions to models