merge the two scripts