first and last-functions.