What was Planck studying in the last part of the nineteenth century?