update err test on range and hook up update