changing layout for automatic