shared lib stub, refactoring