add STM implementation