Added filter and generate functionality for interpreter, kinda messy
though