edited func filter to return DTable