edit mutability and move generator of generics from engine to
transaction