adding in char frequency counter