add input debugging part1
fix filtering