add tests
update model and database