updated toExMS(S)*.pl with new and improved subs