initial version of compose() and 1d test for it