changed promise to reference