called function to display nth element from end