some more string manipulation
restructured