writing metrics