Controlled synthesis of 2D transition metal dichalcogenides: from vertical to planar MoS2