Update STMfunctions.R

revert