Move logic to the View Model