added framerate smoothing
added mean() and median() to array.prototype