Working code for mssm