Studying L-functions via the Trace formula