Relatively fast but could be improved.  Revisit.