add layout. add query with left join