WIP
WIP
WIP
WIP
fix bug
remove cruft