extraction operator overload working

need to clean it up, perhaps decompose.  Also want to see if reduce()
can be more efficient.