Executed: For Loop to output threshold to find ideal value
Fixed error in code and layout