added rollBack() function, but it still needs to be fixed a bit