added KeyWritable class