fixes #2: basic test + bug fix

Testing: it works!