createLayout factory method used