added character filtering