solution

sorce file edited with 2 functions needed for the solution