updated two scripts