give up on pattern matching and use some list first order functions