Added non-exhaustive pattern matching