grid line method written