reduce functions file