some refactoring
guess that number done
unit testing of model