implemented use of doubleArr3 for Moments class