iterate once to get kth to end