implemented Content-Type based downloading