initial implementation of remove chars method
implementation of remove chars method with hashset