Adding rollback code