refactor promise primeval