more sanity checks during data input