FIX #16 parser/pattern/4

Finally got it to work thanks to refactoring