code to process whole composition