establishing script flow