splitting into two scripts