refactoring, string parsing complete with flows and colors