added a &0xFF to sum