modify HTML with callbacks