sequence generaion script (almost) done