simplify split name method and move it into stringHelper class