wip: first pass top to bottom. still many todos