changes to the panel code