added unit testing for model