Added code for two functions per assignment