added pattern matching statement