Almost exact duplicate of previous code.  Opportunity to refactor?