Cannot use 'goto' as an object method