vectorized sigmoid function
vectorized sigmoid function