refactor share string handling to own class