kdTree: insert, contains implementation