Added tests. Works like a charm.