better string parsing