Solution

Completed implementation