big range list fix, dirty, should be rewritten