Goto refactored