characters that are unwanted are now properly removed