added helper function to parse request body string