plot3 refactor; plot4