refine design
make basic parsing work