try to optimize nn