added sanity checks