cleanup Map/Reduce templated API - using template FUNCTION