update panel code