fixes to reduce functions