changed gatekeeper calls to reduce unncessary ones