make all the tests from scratch and made some fixes