much faster way to parse string