addin code for coefp and sim