factory.py: input casting to a string in run()
factory.py: update docstrings