physical merge of k and A code