adding script for module factory