simple scala quad tree implementation