restoring keys