building reduce dim funtionality, still broken