finalizing layout.