Update Assn 1 functions.R