adding promise and log