added  qm.py, has some obsoleted code and doesn't run