cleanup gone wrong
wip still not working
math fixes; works for given params