function for removing adaptors was written