introduced gatekeeper variable

Addresses issue #6 

I know the fix works, but I wanna see how this procedure works, too :)