changed implementation of shape/stride accessors.  much faster now