corrected number of vertical layers