problem evident.
can extract pattern matching, simple ones