Building the 'delete trip' logic