Added loglogplot and calculateCN