refactored some code, notably transition between view controllers