wip.

now works, but crashes.