added roll back functionality and new tests