add condition of N=500