changed nr_activeToInactive as mentioned by professor in email