Adding elcounter functionality