should this be moved to a shared library?