adapt layout