add new tests and refactored the Model