implemented main clope algorythm, tests incoming