fix range after refactor