add compose function