use as a shared library