impl and test to return last array element