add rollback functionality