added rotation for switches