Added checkProtokol function, added test