write methods for certificates