included some sanity checks