implemented ignore checking in two directions