added grid macros