refactor views