implemented moments and refactored _apply_along_axes