moving code fr layout