a bit refactoring view controller