updated submit code to parse string differently