switch controller to merge model inst method
refactoring hw1.1