changed parse to take a string