scalar reduction functions cleaned