updated deny function