started doing the parsing with ugly regex