add tests for range
cleanup etc