smart layout