biggest to smallest script fix