Implemented and tested var and std reduction