commiting button to toggle modes