implementing compose