Added a wrapper function for a boundary gate.