add code for JP's multi-SM