added lcsm solution