created logic between panels