- moving functionality from code-behind to view-model