added script in case state is used by "gender" field.