controller refactor: part 1