working sub panels and preview