wrapped plots in fucntions