Changed sum variable to a more practical type.