Added another way of getting last array's element