2d and 3d range functions in rust