reconfigured main function in words.py