added a squeeze to improve handling of 1D ND data