i36: fixes #36, refactor test