added custom layout for drawing gridlines