Added collision detections to th subviews