fixed, plus unittests