Refactored to summary-number as it makes more sense in this context.
Added a bit of defensive coding with tests for pinTo