update SM, work end to end