Changes to BPL function

moved hidden and output layer initialization into for loop