Added reduce. Didn't solve casting input -> output