add more tests and model code