Added function composition using flatmap