model rollback functionality

basic model rollback functionality