altered gatekeeper invocation -- still needs testing and better implementation