message context creation and updated messagecontext return within loop