added: calculateN