rough sketch for parsing