added next functionality to panel1