Adding guards support to pattern matching