createLayout method added