Implemented Compute Deviation - I feel like there's a better way to do this still..