add tests missing code