Added peak functions.