refactor grid and put inside guarded mixin