My first trial at the functions to be included in my assignment