rewrite test using test macro, fixes #3