add max-gate
refactor variadic gate constructors