added exception handling for stddev, fixed imports