adding changes to mws.py