changed naming convention for variable N