Working implementation of the nested transactions