function [v,x,count,mutates] = find_mutate_h(mu,t,N)

 x = rand(t,N);
 VEC = ones(1,N);
 genes = [0 1 2 3];
 for i =1:N
  a = randperm(4);
  VEC(i) = genes(a(1));
 end 

 VEC0 = VEC;
 skip0 = [ 1 2 3];
 skip1 = [ 3 2 1];
 skip2 = [ 1 2 3];
 skip3 = [ 3 2 1];
 string = 'actg';

 v(1,:) = VEC0;
 count = 0;
 for i =1:t
  ii = i + 1;
  j = find(x(i,:)>1-mu);
  v(ii,:) = v(ii-1,:);
  for k = 1:length(j)
   a = randperm(length(skip0));
   if v(ii,j(k)) == 0 
    v(ii,j(k)) = mod( v(ii,j(k)) + skip0(a(1)),4);    
   end
   if v(ii,j(k)) == 1 
    v(ii,j(k)) = mod( v(ii,j(k)) + skip1(a(1)),4);    
   end
   if v(ii,j(k)) == 2 
    v(ii,j(k)) = mod( v(ii,j(k)) + skip2(a(1)),4);    
   end
   if v(ii,j(k)) == 3 
    v(ii,j(k)) = mod( v(ii,j(k)) + skip3(a(1)),4);    
   end

  end

  count = count + length(j); 
 end

 mutates=0;
 for i =1:N
  if v(ii,i) ~= VEC(i)
    mutates=mutates+1;
  end
 end
  
% mutates = sum(abs(v(ii,:)-VEC0));

