Added print_hosts method