class model was created and used in controller