new code for comparing plots