My Solution

added the function bodies