added boundaries management to function do_yearlyWPAvg