fix exported functions, add to simple test case