support for reading exisiting keys and writing new ones