Solution that does not inherit from String