improved & simplified parsing