modify main.cpp as nn example