split into two scripts