fixed some errors in QS.v, STILL not running, sorry