changed the modification of original string, and removed self as it isn't necessary