layout and table assignment