First akward kd-tree attempt