Modified Delete function to handle any id