add self defined rollback function