unit tests nearly finished