Promise based logic.