general layout script