create switch from checkbox