use function declarations for exports

Closes #12