Added Switching functionality with preset periodicity.