changed algo to percent