Updated filter function, updated debug indicator