Arguments in math.pow were used in the wrong order, computed (noOfFeatures)^2 instead of 2^(numberOfFeatures)