adding first bits of functional programming