add tests and extend certificate generation