add check on merkles count