implement sigmoid, plotData, costFunction.