rhost isn't used in this function, can be deleted?