grid in separate func with bool