Add method to return an int with a default value.