validation & prepare