added funcation to filter strings