moved gt initialization into md function