added a peak return and updated core