stats.c - added standard deviation (unsure of accuracy)