update code preview