fix export, add functions