add restRange problem in scratch.java