Added download function.