Update functions.R

change getcov