sort hostnames