added code for angularpromise-1-b