added a completed solution with mvvm pattern