filter out some crazy characters from input