put the icon url building in it's own function, thanks @morpheus_xx