Update functions2.R

change setting into modsize, add coeftype