added calc for nn