rewrite based on L.Grid