refactored model to viewmodel, fixed broken tests