Second function written