Added a rectangle - rectangle collision detection function