polished up the tests and in working form