added conditions for reads with scan