added method for file downloading