added cdrDemo code, based on networkDemo