Added switch side counter to turn back and forth, and is_odd functionto compare