implemented save and delete for filters, with two types of encoding