Shouldn't i be <= to t and not >= t?