change hostnames type from str to list (list of hostnames)