Adding parsing function