added environment variable check for testing porpoises