function [emmision,transmat]=normalizing_total_count(AA,EE)
  Q=6;
  emmision=zeros(3*Q+3,20);
  transmat=zeros(3*Q+3,3*Q+3);
  for b=1:(3*Q+3)
     for t=1:20
         if EE(b,t)~=0
           emmision(b,t)=EE(b,t)/(sum(EE(b,:)));
         end
     end
  end
   
   for e=1:(3*Q+3)
       for t=1:(3*Q+3)
           if AA(e,t)~=0
              transmat(e,t)=AA(e,t)/(sum(AA(e,:)));
           end
       end
   end
  