change mode on controller script