generate layout