some changesin composing algorithm