adding layout pages functionality