add reduce for basic types