add model and test code