removed xMapWhen; I don't like the idea of using a function just to abstract out an if statement