finalize export method, closes #4