added filtering for peaks