reduce functions in RT