filtering works+ debugging code