Function

writing the function