adding first version fo knitr file based on the morning and early afternoon of day 1 (functions)