added auto layout switch