Use fmap to shorten a bit of code.