by measuring photoelectric effect