refactor view controllers