move code from example layout to default layout