refactored collision handler now only takes rects as arguments