\begin{algorithm} % enter the algorithm environment \caption{procedure DOWNLOAD} % give the algorithm a caption \label{SaS:DOWNLOAD} \STATE {\bf procedure} user\_request($follower\_id$, $friend\_id, content\_id, home\_server, friend\_surrogate$) \begin{algorithmic}[1] % enter the algorithmic environment \REQUIRE USER ID,home\_servere \ENSURE URL of requested content \STATE content$\leftarrow$request\_redirect(content\_id) \IF{content$!=$server} \STATE schedule\_pull(content\_id,server) \ENDIF \STATE {{\bf return} $content\_host$} \STATE {{\bf end procedure} \end{algorithmic} \end{algorithm}