Added compose function.