added auto margins