move relevant code to icons file