removing unknown tokens from input