added 3rd moment calculation