applying layout