diff --git a/alib2algo/src/determinize/vpa/VPADeterminizer.cpp b/alib2algo/src/determinize/vpa/VPADeterminizer.cpp
index b2f859f316afb8ba5dc5db68ed862a396027633d..49c38d7e07f229fe7c409f31ffc248ea97e54bd4 100644
--- a/alib2algo/src/determinize/vpa/VPADeterminizer.cpp
+++ b/alib2algo/src/determinize/vpa/VPADeterminizer.cpp
@@ -23,30 +23,27 @@ label::Label VPADeterminizer::packToDVPAStateLabel(std::set<std::pair<label::Lab
 
 std::set<std::pair<label::Label, label::Label>> VPADeterminizer::unpackFromDVPAStateLabel(const label::Label& data) {
 	std::set<std::pair<label::Label, label::Label>> res;
-	for (const auto& subData : static_cast<const label::LabelSetLabel&>(data.getData()).getData()) {
-		res.insert(static_cast<const label::LabelPairLabel&>(subData.getData()).getData());
+	const std::set<label::Label>& labelSet = static_cast<const label::LabelSetLabel&>(data.getData()).getData();
+	for (const auto& subData : labelSet) {
+		const std::pair<label::Label, label::Label>& labelPair = static_cast<const label::LabelPairLabel&>(subData.getData()).getData();
+		res.insert(labelPair);
 	}
 	return res;
 }
 
 label::Label VPADeterminizer::packToDVPAStackSymbolLabel(std::pair<std::set<std::pair<label::Label, label::Label>>, alphabet::Symbol>&& data) {
-	std::set<label::Label> res;
-	for(auto&& subData : std::move(data.first)) {
-		res.insert(label::Label(label::LabelPairLabel(std::move(subData))));
-	}
-	return label::Label(label::LabelPairLabel(std::make_pair(label::Label(label::LabelSetLabel(std::move(res))), label::Label(label::ObjectLabel(alib::Object(std::move(data.second.getData())))))));
+	label::Label res1 = packToDVPAStateLabel(std::move(data.first));
+	label::Label res2 = label::Label(label::ObjectLabel(alib::Object(std::move(data.second.getData()))));
+	return label::Label(label::LabelPairLabel(std::make_pair(std::move(res1), std::move(res2))));
 }
 
 std::pair<std::set<std::pair<label::Label, label::Label>>, alphabet::Symbol> VPADeterminizer::unpackFromDVPAStackSymbolLabel(const label::Label& data) {
-	std::set<std::pair<label::Label, label::Label>> res;
 	const label::Label& labelPairFirst = static_cast<const label::LabelPairLabel&>(data.getData()).getData().first;
-	for (const auto& subData : static_cast<const label::LabelSetLabel&>(labelPairFirst.getData()).getData()) {
-		res.insert(static_cast<const label::LabelPairLabel&>(subData.getData()).getData());
-	}
+	std::set<std::pair<label::Label, label::Label>> res = unpackFromDVPAStateLabel(labelPairFirst);
 
 	const label::Label& labelPairSecond = static_cast<const label::LabelPairLabel&>(data.getData()).getData().second;
 	const alib::Object& object = static_cast<const label::ObjectLabel&>(labelPairSecond.getData()).getData();
-	return std::make_pair(res, alphabet::Symbol(static_cast<const alphabet::SymbolBase&>(object.getData())));
+	return std::make_pair(std::move(res), alphabet::Symbol(static_cast<const alphabet::SymbolBase&>(object.getData())));
 }
 
 void addRetTransition(const automaton::State& from, const alphabet::Symbol& input, const alphabet::Symbol& dvpdaSymbol, const automaton::State& to, automaton::VisiblyPushdownNPDA& deterministic) {