fix the case when n = 1