trying to figure why upsampleplot gives segmentation fault \!