refactor roll back