Improve sm integrate