added name substitution funct