refactor as demand