added error check for parse