full grid implementation