refactor view structure