whathappens to the electrons energy as it brought closer to the nucleus?