added key writer