refactor some views