add unittests for misc module