Adding some code that somehow got lost.