small performance improvement for range assignment