refined MSP algo