added final print statement for reducer