Modified to avoid using a List iterator, this should close issue# 49