added kdtree impl., range and nearest neighbor are missing
added rectangle computation