Further implementation of nn. Currently updating 'output' array to arraylist