+ unit test on codedetection functions