bugfixes, nearly running now