In general terms, lattice images do not reveal the real atomic structure of the sample directly, can be distorted, and information about the sample thickness and chemical composition is heavily encoded. These drawbacks relate to the presence of lens aberrations and dynamic diffraction. The development of Cs corrected TEM [1,2] and software that reconstructs the complex electron exit wave function [3][4][5][6][7] aim at removing lens aberrations. Several approaches, such as the 1s state model [8], reversing multislice algorithms [9,10], or simulated annealing and maximum likelihood algorithms [11,12], have been proposed to remove the dynamical scattering effect and to retrieve the crystal potential from the complex exit wave. In this paper, we present a new method to retrieve the potential map from the exit wave based on reversing multi-slice calculations. This algorithm uses a non-linear optimization scheme to find an optimum phase grating that satisfies two boundary conditions: knowledge of the entrance surface wave and the measured exit surface wave. The exit wave of a wedge shaped Au crystal and an Al (10%Cu) crystal were simulated to test this algorithm. Good agreement between the recovered crystal potentials and input parameters was found up to a thickness where phase reversal occurs because of dynamic scattering. After the phase grating is retrieved, the position of atom columns and their chemical composition can be quantified. Compositional maps X a (r) and X b (r) of binary alloys can be deduced from the crystal potential map V(r) using the linear relation V(r) = X a (r)V a +X b (r)V b , where V a and V b are the mean inner potentials of the element A and B, respectively. Figure 1 (a) and (b) show the phase of an electron exit wave of an Al:Cu bi-crystal and an InGaN/GaN quantum well that were reconstructed from focal series of 20 images each. Figure 2 (a) and (b) shows the retrieved potential maps of the Al and Cu atoms, respectively, and sitespecific Cu segregation to the boundary is revealed. Fig. 3 (a) and (b) depicts Ga and In maps from the quantum well region. It is clear from both cases that chemical differences can be distinguished on a single atom level due to the different atomic number Z of the elements. Limitations of the algorithm due to systematic and statistical errors will be discussed.