seperated result logic from promise logic