some refactoring, is_switch, is_printable