Flat bands in twisted bilayer transition metal dichalcogenides