diff --git a/lib/lazy_xml_model/collection_proxy.rb b/lib/lazy_xml_model/collection_proxy.rb
index <HASH>..<HASH> 100644
--- a/lib/lazy_xml_model/collection_proxy.rb
+++ b/lib/lazy_xml_model/collection_proxy.rb
@@ -100,18 +100,20 @@ module LazyXmlModel
         if item_from_collection.present?
           item_from_collection
         else
-          item = begin
-            new_item = klass.new
-            new_item.xml_parent_element = xml_parent_element
-            new_item.xml_element = element
-            new_item
-          end
+          item = build_item_for_element(element)
           @collection << item
           item
         end
       end
     end
 
+    def build_item_for_element(element)
+      new_item = klass.new
+      new_item.xml_parent_element = xml_parent_element
+      new_item.xml_element = element
+      new_item
+    end
+
     def element_name
       klass.tag || association_name
     end
small refactor of CollectionProxy