fixes
more bug fixing
still fixing bugs
mostly working, need to profile becasue way too slow
tried some optimizations