feat: auto determine best layout based on result