modify some models and add test cases