syncing in hosts script improved