actually added peak method, small formatting changes