added grid drawing