major improvement because of new intsort function, check obsolete, thanks stekro