Update caption inside loop