Lines 62-76 are exactly the same as lines 82-96, except for the container variable.  Consider creating a helper method.