Good day! I'm not satisfied with the flowchart I made for my thesis. Could someone help me improve it? Also, I want to make the text/caption of the path/line into vertical one. Please help. Thank you
\documentclass[12pt,letterpaper]{article}
\usepackage[margin=1in]{geometry}
\usepackage[latin1]{inputenc}
\usepackage{tikz,amsmath,amssymb,amsthm,epsfig}
\usetikzlibrary{shapes,arrows}
\begin{document}
\pagestyle{empty}
% Define block styles
\tikzstyle{decision} = [diamond, draw, fill=blue!23,
text width=4.5em, text badly centered, node distance=3cm, inner sep=0pt]
\tikzstyle{block1} = [rectangle, draw, fill=blue!20,
text width=5em, text centered, rounded corners, minimum height=5em]
\tikzstyle{block2} = [rectangle, draw, fill=blue!10,
text width=8em, text centered, minimum height=10em]
\tikzstyle{block3} = [rectangle, draw, fill=purple!30,
text width=13em, text centered, minimum height=5em]
\tikzstyle{line} = [draw, thick, -latex']
\tikzstyle{cloud1} = [draw, ellipse,fill=red!18, node distance=4cm,
minimum height=5em]
\tikzstyle{cloud2} = [draw, ellipse,fill=green!18, node distance=5cm,
minimum height=5em, text width=7em]
\tikzstyle{block4}= [rectangle, draw, fill=orange!18,
text width=12em, text centered, minimum height=8em]
\begin{tikzpicture}[node distance = 3cm, auto]
% Place nodes
\node [cloud1] (input) {INPUT};
\node [cloud2, below of=input, node distance=2.5cm] (mn) {$L(m,1),W(3,n)$ where $m,n \in \mathbb{N}$};
\node [block1, left of=mn, node distance=6cm] (step1) {STEP 1:};
\node [block2, left of=step1, node distance=5cm] (vertex) {$V(W(3,n)) = \{v\} \cup \{v_{(i,j)} | i \in \{1,2,3,\ldots,n\} , j \in \{1,2,3\} \}$};
\node [block2, below of=vertex, node distance=5cm] (edge) {$E(W(3,n))= \{ vv_{(i,j)} | i \in \{1,2,\ldots,n\} , j \in \{1,2,3\}\} \cup \{v_{(i,j)}v_{(i,j+1)} | i \in \{1,2,\ldots,n\} , j \in \{1,2,\}\} \cup \{ v_{(i,1)}v_{(i,3)} | i \in \{1,2,\ldots,n\}\}$};
\node [block1, right of=edge, node distance=5cm] (step2) {STEP 2:};
\node [block3, below of=step2, node distance=3cm] (v) {Let $\ell : V(W(3,n)) \longrightarrow \{0,1,2,\ldots\}$ where $\ell(v_0)=0$};
\node [decision, below of=v, left of=v, node distance=4cm] (geq) {$m\geq n$};
\node [block3, right of=geq, node distance=7cm] (1) {$\ell(V_{(i,j)})=jm+(i-1), i \in \{1,2,\ldots n\}, j \in \{1,2,3\}$};
\node [decision, below of=geq] (lessthan) {$m<n$};
\node [block3, right of=lessthan, node distance=7cm] (2) {$\ell(v_{i,j})=jm+(j-1)(n-m)+(i-1), i \in \{1,2,3,\ldots,n\}$ and $j \in \{1,2,3\}$};
\node [cloud2, below of=2, right of=2, node distance=4.5cm] (labeled) {Each vertex has label.};
\node [cloud1, left of=labeled, node distance=5cm] (output) {OUTPUT};
\node [block4, left of=output, node distance=5cm] (optimal) {Optimal $L(m,1)$-labeling for triangular windmill graph $(W(3,n))$.};
% Draw edges
\path [line] (input) -- (mn);
\path [line] (mn) -- (step1);
\path [line] (edge) -- (step2);
\path [line] (step1) -- (vertex);
\path [line] (vertex) -- (edge);
\path [line] (step2) -- (v);
\path [line] (v) -| node {and} (geq);
\path [line] (geq) -- node {TRUE} (1);
\path [line] (geq) -- node {FALSE}(lessthan);
\path [line] (lessthan) -- node {TRUE}(2);
\path [line] (1) -| node [near start] {TRUE} (labeled);
\path [line] (2) -| node [near start] {TRUE} (labeled);
\path [line] (labeled) -- node {TRUE} (output);
\path [line] (output) -- (optimal);
\draw [->,thick] (labeled.north) -- ++(0,0) -- ++(10mm,5mm) |- node [ near start, yshift=1.5em]{FALSE} (step2);
\end{tikzpicture}
\end{document}

