comleted ViewModel.java