add unit test
define models, init database