built gate lock/unlock functions