add return value to learn_k2_cn.m