In gas chromatography the urine sample is vaporised (turned into a gas) and passed through a column containing a polymer. Different substances move through the column at different speeds, so substances in the urine sample separate out. Once the substances have separated out, a mass spectrometer converts them into ions, then separates the ions depending on their mass and charge. The results are analysed by a computer and by comparing them with the results of known substances it's possible to tell which substances were in the urine sample.