code kata 5 - datamunging in scala