Half working code used for MS2