added smart reinitialization for SM kernel