when was television invented what was the purposes