added exception handling
refactored Filter::decode