hash done..integrate left along with special condition in sort