added grid stuff