Improved mssm

merge back to master