updated nn with more variables