improved grid toggling