refactor string package