updated wifi settings to more deduplicated code