Added compose unit test
Added compose function