better writer and reader for kdata