Completed method 1 with layouting