Added grid layout handler