collapsable menus resize intelligently, and implemented toggle switch