so many fixes

So many bugfixes, implementations