change sum to integer