cleaning up icon show code