define grid for puppies
refactor to support both grid and list