removed unecessary level of nesting in get icon functions