view refactor