rewrite the switch image part