Updated code to switch between button icons