modified tests and added more model code