slight optims of tests, added some comments