Adding function compositional logic.