worked on the function for downloading documents from web page