finished setup function and nn class
finished setup function and nn class