adding support for use as module