how to use a gate