Update functions2.R