using pattern matching
stylish haskell changes
using unions over fold