figured out what to do with varying N_cas and N_con