updated distributed script