sample code for accessing first element of a list