rewrite the following function into the form​