improve parsing
compiles ok