added weighted average peak detection
fixed bug in moment peak calculations