fun with functional programming