added rect intersect test