updated for all the optical depths