added dynamic comments to modal and clear modal on close