added tests for retrieving first and last row in the table