fixed problem with showing correct icon, using arrays and switch