changed the logical ifs for the cross correlation decisions