corrected genInputs function have its' first element 1 to take care of the threshold