corrected logic so that GT will be correct