added Plot 4 code