added missing code from previous commit