refactoring + temp cert