Forced the reduce function to return integers