implemented stuff for SSubst and BSubst