added missing stuff from refactor