properly handle range input with indexes