merged the changes in obtaining the attributes and perceptron improved
with ryan's stuff.