added manual mode switch