fixed memory leak, will need to pass the vectors to the perceptron function like this: &vec[0]