add horizontal and vertical layout