please use lowercase for function variables N should be n