function returns third element of a list