refactor w views