SM code added