Fill in the function bodies