restructuring according to view-model