add ability to use as module