move function into exports