universalizing first and last pointers