wrote nn class