added subspace code
corrected typo in main-lqp