minor: add tests & comments