fixed tests, add some utils