Changed parsing function