fixing plot4.R