filter working periodically, clear problems in python