rearranges into mvc structure