refactoring hosts - resource, host_info, id_key