added kth to last method