added some functions needed for importing keys