Creating functions from code stubs for Project 2