element wise ops changed to factory pattern rather than reflection