some tests of main algorithm added