removed atomic min and replaced with optimized reduce -- currently broken