added some unittests, one failes, dont know why