My modifications to v5 of rstm