adding bit counter