I understand the photoelectric effect and I assumed until an hour ago that to excite an electron, the photon should have energy equal to the binding energy of the initial level plus the binding energy of the final level. as I found out solving some problems, I'm wrong. the photon should have energy that is equal to the gap of the two levels. I don't understand how does this process work? let's say I have a hydrogen atom and I want to move its electron to the second energy level, how is a photon with 10.2 energy able to do that? aren't we supposed to free the electron first (give it 13.6 ev) and then give it 3.4 ev to be in the second level?