add save_key support