added auto layout feature