small change to updateIcons(index) method