introduce comments
introduce code from mean version of function (NON-WORKING)
implement the necessary code
provide example