ranger over index/value to avoid unnecessary item access
adding pic kata from golang tour
refactoring: extract function