Updated file to include completed functions with comments