modified the cancel functions/files