refactoring for hotprobs