changing functions to override String prototype instead of being a function