refactoring
add mvc design and test