stopped reinventing the wheel

bugfixes