% produces nice looking headers and footers

\pagestyle{fancy} 
\fancypagestyle{plain}{
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\headrulewidth}{0.4pt}}

\renewcommand{\chaptermark}[1]{\markboth{\textsc{#1}}{}}

\fancyhf{} %reset headers/footers
\fancyhead[R]{\leftmark\vspace{0pt}}
\fancyfoot[C]{\thepage} 
\renewcommand{\footrulewidth}{0.4pt}
\renewcommand{\headrulewidth}{0.4pt}
