On the theory of the work function