sort keys in getHostsList as well