some improvements
moved tester