Reduced number of loop count