modify gates