scripts improvements