update 'stat' and 'subst' in more proper functions