v1.0
Added commentaries.
Added the code of the two functions