midway

- no more push and pop
- make type field work for leaves