refornating of the function and the output