validation & formatting