added protocol check