added panels to template and replaced modals