bug : string replace is not mutable + coding style