model rollback functionality