OMG, did I write this flatMap?!