TODO: Fix the syntax of the patterns matching