Added sample for jquery promise