updated code to work with changes in wpm, gunicorn is still not working for me