lastpercent initialized to 0