Added tests for gt method and fix bug in gt implementation #3