character removal method