Filling in function stubs

Completed the functions that were stubbed out for assignment #2.