added rollback functionality