edited comments with regard to switch/ if clause