rework of get ip
added get_keys