cal_test almost working