changed plot4.R