added end database peak recognition