created rollback functionality