ex2 sigmoid & costFunction