some coding for panels