added function to parse strings