Function gt_check is complete, inefficient but complete.