First working version

I include the two functions and two examples of use