updated timing code for addFirst (problem3a)