one more implementation
find kth element