added some functions
added new methods
added model tests