wip
fix obvious bugs
fix some obvious bugs
fix bugs