another fix for the dimension issu; this time find the smallest dimensions and subsample down