added in panel toggle functionality