added Ramnath's ScatterMatrix class