Gram developed the technique working with another scientist, Carl Friedländer in a hospital in Berlin. However, Gram first used the test to make bacteria in the lungs easier to see. He published his finished method in 1884.