mvvm refactoring