working with ranges and orders