more updates to determine states, and adding filtering columns/rows