updated combining script passed some test so far