playing around with functional programming