model manipulation and basic view change logic