initial grid builder logic added