WIP: fix export functions