rename init_keys to register_keys and change the behavior of this function