modify upto/downto for compatibility