The code behind GMT