refactor MasterViewController