small error in append and removed pyplot thing from slices