#27: add and fix tests